package com.qf.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class User  {
    private Integer id;
    private String name;
    private Boolean sex;

    @DateTimeFormat(pattern = "yyyy-MM-hh")
    private Date birth;
    private String[] hobby;

    public User(Integer id, String name, Boolean sex, Date birth) {
        this.id = id;
        this.name = name;
        this.sex = sex;
        this.birth = birth;
    }

    public User(Integer id, String name,  Date birth) {
        this.id = id;
        this.name = name;
        this.birth = birth;
    }
    public User(Integer id, String name) {
        this.id = id;
        this.name = name;
    }
}
